Repository navigation
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
| @@ -0,0 +1,13 @@ | |||
| from playwright.sync_api import Page, expect | |||
| from pages.exams_page import ContactPage | |||
There was a problem hiding this comment.
ContactPage è in pages.contact_page, con pages.exams_page l'import va in ImportError, la CI fallisce per questo
| from pages.exams_page import ContactPage | ||
|
|
||
|
|
||
| def test_contact_mail(page: Page) -> None: |
There was a problem hiding this comment.
il README chiede anche il pattern BDD, puoi scrivere lo scenario in un file .feature in tests/features e implementare gli step con pytest-bdd, come in tests/test_login_bdd.py
|
|
||
| contact_page= ContactPage(page) |
There was a problem hiding this comment.
puoi togliere la riga vuota dopo la def, e manca lo spazio prima di =
| contact_page= ContactPage(page) | ||
|
|
||
| # act | ||
| ContactPage.goto() |
There was a problem hiding this comment.
goto() va chiamato su contact_page, sulla classe va in TypeError perché manca self
| ContactPage.goto() | ||
|
|
||
| # assert | ||
| expect(page.contact_mail).to_have_text("student.office@example.com") |
There was a problem hiding this comment.
contact_mail è un attributo di contact_page, page non ce l'ha e va in AttributeError
No description provided.